import { http } from '@/utils/http'

let FixApi = ''
if (process.env.NODE_ENV == 'development') {
  FixApi = '/web' //开发环境
} else {
  FixApi = '/web' //生产环境
}

//定制手册查询
export const getFilePage = (data : any) => {
  return http({
    method: 'POST',
    url: `${FixApi}/cl/file/queryClFilePage.json`,
    data,
  })

}

//根据attachId获取ID
export const getAttachUrl = (data : any) => {
  return http({
    method: 'POST',
    url: `${FixApi}/fm/file/queryFilePage.json`,
    data
  })
}
/**
 * 收藏
 */
export const collectFile = (data : any) => {
  return http({
    method: 'POST',
    url: `${FixApi}/cl/fileCollect/saveFileCollect.json`,
    data
  })
}

// 获取分类
export const getClasstree= (data : any) => {
  return http({
    method: 'POST',
    url: `${FixApi}/rs/huidaResourceBase/queryClasstreeForPlat.json`,
    data
  })
}
